package com.ff.xyh.access.service.access;

import com.ff.xyh.common.entity.useraccess.AccessPermission;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CachePut;

import java.util.List;

/**
 * <p>
 * 后台许可表 服务类
 * </p>
 *
 * @author ff
 * @since 2022-10-30
 */

@CacheConfig(cacheNames = {"AccessPermissionService"})
public interface AccessPermissionService extends IService<AccessPermission> {

    @CachePut(unless = "#result == null or #result.isEmpty()", key = "#userId")
    List<String> selectPermissionValueListByUserId(String userId);

    List<AccessPermission> selectPermissionListByUserId(String userId);

    List<AccessPermission> getMenu(String username);
}
